package com.kxmall.huishou.domain.bo;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.kxmall.common.core.domain.BaseEntity;
import com.kxmall.common.core.validate.AddGroup;
import com.kxmall.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.math.BigDecimal;

/**
 * 回收废品信息业务对象 hs_user_waste
 *
 * @author kxmall
 * @date 2023-11-24
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class HsUserWasteBo extends BaseEntity {

    /**
     * 
     */
    @NotNull(message = "不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 订单id
     */
    @NotNull(message = "订单id不能为空", groups = { EditGroup.class })
    private Long orderId;

    /**
     * 0预约订单，1结算订单
     */
    @NotNull(message = "0预约订单，1结算订单不能为空", groups = { EditGroup.class })
    private Long orderType;

    /**
     * 分类id
     */
    @NotNull(message = "分类id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long categorizeId;

    /**
     * 分类名
     */
//    @NotBlank(message = "分类名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String categorizeName;

    /**
     * 重量
     */
    @NotNull(message = "重量不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal weight;

    /**
     * 金额
     */
    @NotNull(message = "金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal amount;

    /**
     * 价格
     */
    @NotNull(message = "价格不能为空", groups = { EditGroup.class })
    private BigDecimal price;

    /**
     * 图片
     */
    @NotBlank(message = "图片不能为空", groups = { AddGroup.class, EditGroup.class })
    private String imgUrl;

    /**
     * 计量类型，0按重量，1按数量
     */
    private Long countType;

    /**
     * 计量单位
     */
    private String unit;
    /**
     * 是否已删除 默认0
     */
    @TableLogic(value = "0",delval = "1")
    private Integer isDel;
}
